<?php
include 'Animation.php';
include 'AniCavas.php';

$x = $y = 0;
$idx = 1;

$animation = new Animation();
$animation->addLegend("bgs/sidebar.png");
$animation->setTitleHeight($height = 20);
$animation->addTitlebar("bgs/titlebar.png");
$animation->addBackground(Animation::readListFile("bglist.csv", $header = true));
$animation->addForeground(Animation::readListFile("fglist.csv"));
$animation->setBackgroundColor("white");
$animation->addRaster(Animation::readListFile("pngfilelist.csv"), $annotateX = 512, $annotateY = 15);
$animation->addImage("bgs/example.png", 520, 480);
$animation->addAnnotate("this is new hello world", 250, 15);

$animation2 = new Animation();
$animation2->addLegend("bgs/sidebar.png",POS_WEST);
$animation2->setTitleHeight($height = 20);
$animation2->addTitlebar("bgs/titlebar.png");
$animation2->addBackground(Animation::readListFile("bglist.csv", $header = true));
$animation2->addForeground(Animation::readListFile("fglist.csv"));
$animation2->setBackgroundColor("white");
$animation2->addRaster(Animation::readListFile("pngfilelist.csv"), $annotateX = 512, $annotateY = 15);
$animation2->addImage("bgs/example.png", 20, 480);
$animation2->addAnnotate("this is new hello world from animation 2", 250, 15);

$aniCavas = new AniCavas(800, 600);
$aniCavas->addAnimation($animation, 0, 0, 400, 300);
$aniCavas->addAnimation($animation2, 400, 300, 400, 300);
$aniCavas->addAnnotation("hello world from canvas", 500, 200);
$aniCavas->addImage("bgs/example.png", 0, 300);
$aniCavas->setLogo("bgs/logo.png", 700, 10);
$aniCavas->makeWmv("ffmpeg");
//$aniCavas->make("",800,600);
exit;
?>
